package Chapter10_InnerClass;

/**
 * Date: 2019/2/19
 * Time: 10:45
 * User: Driss.
 *
 * 10.3 使用.this与.new
 */
public class DoThis {
    void f(){
        System.out.println("DoThis.f()");
    }

    public class Inner{
        public DoThis outer(){
            return DoThis.this;
        }
    }

    public Inner inner(){
        return new Inner();
    }

    public static void main(String[] args) {
        DoThis dt = new DoThis();
        Inner dti = dt.inner();
        dti.outer().f();
    }
}
